package com.pigs.pigsordersystem.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.pigs.pigsordersystem.entity.ProductEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author Y.yang
 * @since 2020-03-14
 */
@Repository
public interface ProductMapper extends BaseMapper<ProductEntity> {

    /**
     * 查询 产品信息
     * @return
     */
    public List<ProductEntity> queryProductList();


    /**
     * 查询 客户 购买订单
     *
     * @param userName
     *  @param page
     * @return
     */
    public IPage<ProductEntity> queryOrderList(Page page, String userName);

}
